@tool
extends Node2D


@export var size:Vector2 = Vector2(10, 10):
    set(value):
        size = value
        queue_redraw()

@export var width: int = 2:
    set(value):
        width = value
        queue_redraw()

@export var color: Color = Color.GREEN:
    set(value):
        color = value
        queue_redraw()



func _ready() -> void:
    if Engine.is_editor_hint(): return
    Input.mouse_mode = Input.MOUSE_MODE_HIDDEN


func _process(_delta: float) -> void:
    if Engine.is_editor_hint(): return
    global_position = get_global_mouse_position()


func _draw() -> void:
    draw_line(Vector2(-size.x / 2, 0), Vector2(size.x / 2, 0), color, width)
    draw_line(Vector2(0, size.y / 2), Vector2(0, -size.y / 2), color, width)
